package com.module.overview.ui.summaryReport

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.common.app.data.bean.overView.SummaryReportRecordBean
import com.common.app.utls.TimeUtils.getMonthDayMMdd
import com.common.app.utls.TimeUtils.transferTimeFromLong
import com.module.overview.R

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2025/08/06
 *
 * 描述：
 *
 * 修订历史：
 *
 */
class SummaryReportRecordAdapter : BaseQuickAdapter<SummaryReportRecordBean, BaseViewHolder>(R.layout.overview_item_summary_report_record) {

    override fun convert(holder: BaseViewHolder, item: SummaryReportRecordBean) {
        holder.itemView.rootView.alpha = if (item.tips.isNullOrEmpty()) 1f else 0.5f
        holder.setText(R.id.tvName, "${getMonthDayMMdd(item.startTime)}-${getMonthDayMMdd(item.endTime)}")
        holder.setGone(R.id.tvTips, item.tips.isNullOrEmpty())
        holder.setGone(R.id.imgArrow, !item.tips.isNullOrEmpty())
        holder.setText(R.id.tvTips, item.tips)
    }

    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
    }

}